<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
session_start();
switch($_data["lang"]) {
	case 1:
		$_SESSION["Mem_LanguageNo"] = 1;
		$_SESSION["Mem_Charset"] = "big5";
		break;

	case 2:
		$_SESSION["Mem_LanguageNo"] = 2;
		$_SESSION["Mem_Charset"] = "iso-8859-1";
		break;

	case 3:
		$_SESSION["Mem_LanguageNo"] = 3;
		$_SESSION["Mem_Charset"] = "gb2312";
		break;

	default:
		if(empty($_SESSION["Mem_LanguageNo"])){
			$arrlang = explode(",",$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
			switch(strtolower($arrlang[0])) {
				case "en":
					$_SESSION["Mem_LanguageNo"] = 2;
					$_SESSION["Mem_Charset"] = "iso-8859-1";
					break;

				case "zh-tw":
					$_SESSION["Mem_LanguageNo"] = 1;
					$_SESSION["Mem_Charset"] = "big5";
					break;

				default:
					$_SESSION["Mem_LanguageNo"] = 3;
					$_SESSION["Mem_Charset"] = "gb2312";
					break;

			}
		}
		break;
}
?>